﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Surface;
using Microsoft.Surface.Presentation;
using Microsoft.Surface.Presentation.Controls;

using System.Windows.Media.Media3D;
using System.Windows.Media.Animation;
using SurfaceCardsGameKit.Games.BasicGame;

namespace SurfaceCardsGameKit
{
    /// <summary>
    /// Interaction logic for Carte.xaml
    /// </summary>
    public partial class ImageCard : SurfaceUserControl
    {


        public string Number
        {
            get { return (string)GetValue(NumberProperty); }
            set { SetValue(NumberProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Number.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty NumberProperty =
            DependencyProperty.Register("Number", typeof(string), typeof(ImageCard), new UIPropertyMetadata("0"));


        public BasicCardsColor Color
        {
            get { return (BasicCardsColor)GetValue(ColorProperty); }
            set { SetValue(ColorProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Color.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ColorProperty =
            DependencyProperty.Register("Color", typeof(BasicCardsColor), typeof(ImageCard), new UIPropertyMetadata(BasicCardsColor.Club));



        public bool Temp1
        {
            get { return (bool)GetValue(Temp1Property); }
            set { SetValue(Temp1Property, value); }
        }

        // Using a DependencyProperty as the backing store for Icone1.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty Temp1Property =
            DependencyProperty.Register("Temp1", typeof(bool), typeof(ImageCard), new UIPropertyMetadata(false));

        public bool Temp2
        {
            get { return (bool)GetValue(Temp2Property); }
            set { SetValue(Temp2Property, value); }
        }

        // Using a DependencyProperty as the backing store for Icone1.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty Temp2Property =
            DependencyProperty.Register("Temp2", typeof(bool), typeof(ImageCard), new UIPropertyMetadata(false));

        public bool Temp3
        {
            get { return (bool)GetValue(Temp3Property); }
            set { SetValue(Temp3Property, value); }
        }

        // Using a DependencyProperty as the backing store for Icone1.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty Temp3Property =
            DependencyProperty.Register("Temp3", typeof(bool), typeof(ImageCard), new UIPropertyMetadata(false));

        public bool Temp4
        {
            get { return (bool)GetValue(Temp4Property); }
            set { SetValue(Temp4Property, value); }
        }

        // Using a DependencyProperty as the backing store for Icone1.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty Temp4Property =
            DependencyProperty.Register("Temp4", typeof(bool), typeof(ImageCard), new UIPropertyMetadata(false));

        public bool Temp5
        {
            get { return (bool)GetValue(Temp5Property); }
            set { SetValue(Temp5Property, value); }
        }

        // Using a DependencyProperty as the backing store for Icone1.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty Temp5Property =
            DependencyProperty.Register("Temp5", typeof(bool), typeof(ImageCard), new UIPropertyMetadata(false));

        public bool Temp6
        {
            get { return (bool)GetValue(Temp6Property); }
            set { SetValue(Temp6Property, value); }
        }

        // Using a DependencyProperty as the backing store for Icone1.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty Temp6Property =
            DependencyProperty.Register("Temp6", typeof(bool), typeof(ImageCard), new UIPropertyMetadata(false));

        public bool Temp7
        {
            get { return (bool)GetValue(Temp7Property); }
            set { SetValue(Temp7Property, value); }
        }

        // Using a DependencyProperty as the backing store for Icone1.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty Temp7Property =
            DependencyProperty.Register("Temp7", typeof(bool), typeof(ImageCard), new UIPropertyMetadata(false));

        public bool TempV
        {
            get { return (bool)GetValue(TempVProperty); }
            set { SetValue(TempVProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Icone1.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TempVProperty =
            DependencyProperty.Register("TempV", typeof(bool), typeof(ImageCard), new UIPropertyMetadata(false));


        public bool TempD
        {
            get { return (bool)GetValue(TempDProperty); }
            set { SetValue(TempDProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Icone1.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TempDProperty =
            DependencyProperty.Register("TempD", typeof(bool), typeof(ImageCard), new UIPropertyMetadata(false));


        public bool TempR
        {
            get { return (bool)GetValue(TempRProperty); }
            set { SetValue(TempRProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Icone1.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TempRProperty =
            DependencyProperty.Register("TempR", typeof(bool), typeof(ImageCard), new UIPropertyMetadata(false));

        public ImageCard(int num)
        {
            InitializeComponent();

            Number = num.ToString();

            if (num == 1 || num == 3 || num == 5 || num == 9) Temp1 = true;
            if (num == 2 || num == 3) Temp2 = true;
            if (num == 4 || num == 6 || num == 5 || num == 7 || num == 8 || num == 9 || num == 10) Temp3 = true;
            if (num == 6 || num == 7 || num == 8) Temp4 = true;
            if (num == 7 || num == 8 || num == 10) Temp5 = true;
            if (num == 8 || num == 10) Temp6 = true;
            if (num == 9 || num == 10) Temp7 = true;
            if (num == 11)
            {
                Number = "V";
                TempV = true;
            }
            if (num == 12)
            {
                Number = "D";
                TempD = true;
            }
            if (num == 13)
            {
                Number = "R";
                TempR = true;
            }

        }
    }
}
